package com.lxlg.lxlg_order.service.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lxlg.lxlg_order.client.param.MemberShipLevelsForm;
import com.lxlg.lxlg_order.infra.mapper.MembershipLevelsMapper;
import com.lxlg.lxlg_order.infra.model.MembershipLevels;
import com.lxlg.lxlg_order.service.service.MembershipLevelsService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author kevin
 * @since 2022-04-28
 */
@Service
public class MembershipLevelsServiceImpl extends ServiceImpl<MembershipLevelsMapper, MembershipLevels> implements MembershipLevelsService {

    @Override
    public void addMemberShipLevels(MemberShipLevelsForm vipLevelsForm) {
        MembershipLevels membershipLevels = BeanUtil.copyProperties(vipLevelsForm, MembershipLevels.class);

        System.out.println(membershipLevels);
        saveOrUpdate(membershipLevels);
    }
}

